package com.wing.product.model.request;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.wing.cabinet.utils.ExcelExport;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 产品Form
 *
 * @author
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class ProductDto {

    /*@ExcelExport(name = "产品名称", orderNum = "1",  isImportField = "productName")
    private String productName;

    @ExcelExport(name = "产品编码", orderNum = "2",  isImportField = "productCode")
    private String productCode;*/

    @ExcelExport(value = "物料名称", sort = 10)
    private String skuName;

    @ExcelExport(value = "物料系列名称", sort = 11)
    private String productName;

    @ExcelExport(value = "物料编码", sort = 20)
    private String skuCode;

    @ExcelExport(value = "物料类型", sort = 31)
    private String productTypeName;

    @ExcelExport(value = "物料分类", sort = 32)
    private String productCategoryName;

   // @ExcelExport(name = "基础单位", orderNum = "5",  isImportField = "unitName")
    private String unitName;

    @ExcelExport(value = "品牌", sort = 40)
    private String productBrandName;

    @ExcelExport(value = "规格码", sort = 30)
    private String oldSpecCode;

/*    @ExcelExport(name = "商品规格值名称", orderNum = "8",  isImportField = "skuSpecValueNames")
    private String skuSpecValueNames;*/


    @ExcelExport(value = "库存数", sort = 60)
    private Integer quantity;


    @ExcelExport(value = "告警库存数量", sort = 80)
    private Integer warningQuantity;
    /**
     * 归还时长阈值
     */
    @ExcelExport(value = "归还时长阈值", sort = 90)
    private Integer returnThreshold;

    /**
     * 呆滞时长阈值
     */
    @ExcelExport(value = "呆滞时长阈值", sort = 100)
    private Integer lethargyThreshold;

    /**
     * 创建时间
     */
    @ExcelExport(value = "创建时间", sort = 110)
    @JsonFormat(timezone = "GMT+8" , pattern = "yyyy-MM-dd HH:mm:ss" )
    private LocalDateTime createTime;
    //@ExcelExport(name = "包装方式", orderNum = "12",  isImportField = "packName")
    private String packName;
    //@ExcelExport(name = "基础单位数量", orderNum = "13",  isImportField = "baseRate")
    private Integer baseRate;
    //@ExcelExport(name = "包装单位名称", orderNum = "14",  isImportField = "packUnitName")
    private String packUnitName;

    @ExcelExport(value = "市场价", sort = 50)
    private BigDecimal marketPrice;

    /*@ExcelExport(name = "渠道价", orderNum = "16",  isImportField = "spPrice")
    private BigDecimal spPrice;

    @ExcelExport(name = "平台供货价", orderNum = "17",  isImportField = "supplyPrice")
    private BigDecimal supplyPrice;

    @ExcelExport(name = "最低活动价", orderNum = "18",  isImportField = "activityPrice")
    private BigDecimal activityPrice;

    @ExcelExport(name = "商品条型码", orderNum = "19",  isImportField = "barcode")
    private String barcode;*/
    //@ExcelExport(value = "在柜库存", sort = 70)
    private Integer quantityCellCab;

    private Integer quantityTempCab;

    @ExcelExport(value = "在柜库存", sort = 70)
    private Integer quantityCab;

/*    public Integer getQuantityCab(){
        Integer sum=0;
        if(this.quantityCellCab!=null){
            sum+=this.quantityCellCab;
        }
        if (this.quantityTempCab!=null){
            sum+=this.quantityTempCab;
        }
        return sum;
    }*/

}
